package com.jrx.anytxn.param.transaction.job.paph.step;

import com.jrx.anytxn.param.entity.TlFilePaymentLog;
import com.jrx.anytxn.param.mapper.ext.ExtTlBillTransCompareDetailMapper;
import com.jrx.anytxn.param.mapper.ext.ExtTlBillTransDetilMapper;
import com.jrx.anytxn.param.mapper.ext.ExtTlFilePaymentLogMapper;
import com.jrx.anytxn.param.transaction.job.billCompare.bean.BillDetilReadBean;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UpdateFileLogWriter implements ItemWriter<TlFilePaymentLog> {

    @Resource
    private ExtTlFilePaymentLogMapper extTlFilePaymentLogMapper;


    @Override
    public void write(List<? extends TlFilePaymentLog> items) throws Exception {
        if(CollectionUtils.isNotEmpty(items)){
            extTlFilePaymentLogMapper.batchUpdateLogForBatch((List<TlFilePaymentLog>)items);
        }
    }
}
